﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using OFB.BLL.Context;

namespace OFB.BLL.Repository
{
    public class ReportTraineeMissFeebackBLL
    {
        private ReportTraineeMissFeebackContext context;
        public ReportTraineeMissFeebackBLL()
        {
            context = new ReportTraineeMissFeebackContext();
        }

        public ICollection<ViewModel.ReportTraineeMissFeebackViewModel> GetTraineeMissFeedback(int topicId, int courseId)
        {
            return context.Trainee.Init("Report_GetTraineeMissFeedback", 
                context.Trainee.BuildParameter("TopicId", System.Data.DbType.Int32, topicId), 
                context.Trainee.BuildParameter("CourseId", System.Data.DbType.Int32, courseId))
                .MapCollection<ViewModel.ReportTraineeMissFeebackViewModel>().GetCollection();
        }
    }
}
